export default {
  name: "XButtonGroup",
  props: {
    compact: {
      type: Boolean,
      default: true
    }
  },
  render(h) {
    const arry = this.$slots.default.map(VNode => {
      return h('p', {
        class: 'control'
      }, [VNode])
    })
    return h(
      'div', {
        class: this.groupClass
      }, arry,
    )
  },
  computed: {
    groupClass() {
      const className = ["field"];
      className.push(this.compact ? "has-addons" : "is-grouped");
      return className;
    }
  }
};
